﻿@model CommentViewModel

<div class="comment">
	<div>
		<span class="commentAuthor">@this.Model.Author</span>
		<span class="commentControlButtons">
			<span class="currentRank">@this.Model.Rank</span> | 
			@using (this.Html.BeginForm("RankComment", "Comments"))
			{
				<button name="action" title="@Resources.RankGood" type="submit" class="rankButton commentRank" value="+">+</button>
				<button name="action" title="@Resources.RankBad" type="submit" class="rankButton commentRank" value="-">-</button>
				<input type="hidden" name="entryId" value="@this.Model.EntryId" />
				<input type="hidden" name="commentId" value="@this.Model.Id" />
			}
			@if (this.Model.IsLogged)
			{
				using (this.Html.BeginForm("ManageComment", "Comments"))
				{
					<button name="action" type="submit" value="edit" title="@Resources.EditComment" class="linkButton">@Resources.Edit</button>
					<button name="action" type="submit" value="delete" title="@Resources.DeleteEntry" class="linkButton">@Resources.Delete</button>
					<input type="hidden" name="entryId" value="@this.Model.EntryId" />
					<input type="hidden" name="commentId" value="@this.Model.Id" />
				}
			}
		</span>
	</div>
	<div class="commentDate">
		@this.Model.Created
	</div>
	<div>
		@this.Model.Content
	</div>
</div>